package com.gitee.wsl.mathematics.algebraic.op

import com.gitee.wsl.mathematics.algebraic.Algebra

/**
 * A container for operations related to `exp` and `ln` functions.
 *
 * @param T the type of element of this structure.
 */
 interface ExponentialOperations<T> : Algebra<T> {
    /**
     * Computes Euler's number `e` raised to the power of the value [arg].
     */
     fun exp(arg: T): T

    /**
     * Computes the natural logarithm (base `e`) of the value [arg].
     */
     fun ln(arg: T): T

    /**
     * Computes the hyperbolic sine of [arg].
     */
     fun sinh(arg: T): T

    /**
     * Computes the hyperbolic cosine of [arg].
     */
     fun cosh(arg: T): T

    /**
     * Computes the hyperbolic tangent of [arg].
     */
     fun tanh(arg: T): T

    /**
     * Computes the inverse hyperbolic sine of [arg].
     */
     fun asinh(arg: T): T

    /**
     * Computes the inverse hyperbolic cosine of [arg].
     */
     fun acosh(arg: T): T

    /**
     * Computes the inverse hyperbolic tangent of [arg].
     */
     fun atanh(arg: T): T

     companion object {
        /**
         * The identifier of exponential function.
         */
         const val EXP_OPERATION: String = "exp"

        /**
         * The identifier of natural logarithm.
         */
         const val LN_OPERATION: String = "ln"

        /**
         * The identifier of hyperbolic sine.
         */
         const val SINH_OPERATION: String = "sinh"

        /**
         * The identifier of hyperbolic cosine.
         */
         const val COSH_OPERATION: String = "cosh"

        /**
         * The identifier of hyperbolic tangent.
         */
         const val TANH_OPERATION: String = "tanh"

        /**
         * The identifier of inverse hyperbolic sine.
         */
         const val ASINH_OPERATION: String = "asinh"

        /**
         * The identifier of inverse hyperbolic cosine.
         */
         const val ACOSH_OPERATION: String = "acosh"

        /**
         * The identifier of inverse hyperbolic tangent.
         */
         const val ATANH_OPERATION: String = "atanh"
    }
}